package model

import "time"

type GvImUser struct {
	ID        uint      `json:"id" gorm:"primaryKey;not null;autoIncrement;comment:用户id"`
	Username  string    `json:"username" gorm:"index;not null;comment:用户名"`
	Password  string    `json:"password" gorm:"not null;comment:密码"`
	Nickname  string    `json:"nickname" gorm:"comment:昵称"`
	Fullname  string    `json:"fullname" gorm:"comment:姓名"`
	Email     string    `json:"email" gorm:"index;comment:邮箱"`
	Phone     int       `json:"phone" gorm:"index;comment:手机号"`
	Sex       int       `json:"sex" gorm:"comment:性别"`
	Birthday  time.Time `json:"birthday" gorm:"autoCreateTime;comment:生日"`
	Avatar    string    `json:"avatar" gorm:"comment:头像"`
	CreatedAt int64     `json:"created_at" gorm:"autoCreateTime;comment:创建时间"`
	UpdatedAt int64     `json:"updated_at" gorm:"autoUpdateTime;comment:更新时间"`
}

func (GvImUser) TableName() string {
	return "gv_im_user"
}
